<?php  
class AdressModel extends Model{
	public $table='adress';

	public function addAdress(){
		if (trim($_POST['username'])=='') {
			$this->error="收货人不能为空";return false;
		}
		if (trim($_POST['adress'])=='') {
			$this->error='收货地址不能为空';return false;
		}
		if (trim($_POST['tel'])=='') {
			$this->error='收货人号码不能为空';return false;
		}
		if (trim($_POST['email'])=='') {
			$this->error='订单通知邮箱不能为空';return false;
		}
		if (trim($_POST['call'])=='') {
			$this->error='订单通知手机不能为空';return false;
		}

		$id=$this->add();

		return $id;
	}
}
?>